﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PServiceBus.Core.Runtime;
using PServiceBus.Core.Runtime.Transports;

namespace PServiceBus.Core.Interface {
    /// <summary>
    /// Transport for sending messages to subscribers: HTTP, WCF, MsQueue, RabbitMQ, RavenDb, e.t.c
    /// </summary>
    public interface ITransport {
        /// <summary>
        /// Gets or sets the format that would be data structure of the message. ex. xml, json, text.
        /// </summary>
        /// <value>The format.</value>
        TransportFormat Format { get; set; }
        /// <summary>
        /// Sends the specified message to the subscriber
        /// </summary>
        /// <param name="message">The message.</param>
        /// <returns></returns>
        TransportResponse Send(string message, Dictionary<string, object> messageStructure);
    }
}
